
/*
 * @Author: 郑俊标
 * @Date: 2024-05-29 15:28:00
 * @LastEditors: 郑俊标
 * @LastEditTime: 2024-06-17 15:38:15
 * @Description: 
 */
const { createProxyMiddleware } = require('http-proxy-middleware');
const path = require('path')

function resolve(dir) {
  return path.join(__dirname, dir)
}


const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  css: {
    loaderOptions: {
      sass: {
        sassOptions: { outputStyle: "expanded" }
      }
    }
  },
  configureWebpack: {
    resolve: {
      alias: {
        '@': resolve('src')
      }
    },
  },
  chainWebpack(config) {
    // set svg-sprite-loader
    config.module
      .rule('svg')
      .exclude.add(resolve('src/assets/icons'))
      .end()
    config.module
      .rule('icons')
      .test(/\.svg$/)
      .include.add(resolve('src/assets/icons'))
      .end()
      .use('svg-sprite-loader')
      .loader('svg-sprite-loader')
      .options({
        symbolId: 'icon-[name]'
      })
      .end()

   
  }
})

